﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "picwindow.h"
#include <QTextCodec>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:


    void on_pushButton_clicked();

    void on_horizontalSlider_valueChanged(int value);

    void on_spinBox_valueChanged(int arg1);

    void on_horizontalSlider_2_valueChanged(int value);

    void on_spinBox_2_valueChanged(int arg1);

    void on_horizontalSlider_3_valueChanged(int value);

    void on_spinBox_3_valueChanged(int arg1);

    void on_horizontalSlider_4_valueChanged(int value);

    void on_spinBox_4_valueChanged(int arg1);

    void on_horizontalSlider_5_valueChanged(int value);

    void on_spinBox_5_valueChanged(int arg1);

    void on_horizontalSlider_6_valueChanged(int value);

    void on_spinBox_6_valueChanged(int arg1);

private:
    Ui::MainWindow *ui;
    PicWindow* picwin = new PicWindow;
    int OpenImageFile();
    void PicShuaXin();
    QImage img, qimghsv;
    cv::Mat imgHsv, mask;
    cv::Scalar lower = cv::Scalar(0,0,0);
    cv::Scalar upper = cv::Scalar(0,0,0);
};
#endif // MAINWINDOW_H
